<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
<head>
<%@include file="/common/taglibs.jsp"%>
<%@include file="/common/ec.jsp"%>
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp"%>
<title>差旅报销标准列表</title>
<script type="text/javascript">
function remove(id){
    Ext.MessageBox.confirm('提示','确认要删除类别吗？', function(btn){
        if (btn == 'yes') {
        	window.location.href="${ctx}/base/tripgrade/remove.do?model.id=" + id;
        }
    });	
}

function removeAo(){
    Ext.MessageBox.show({
        title:'提示',
        minWidth:220,
        msg:'<div style=\'width:180\';><br/>此类别已有新闻，不能删除！</div>',
        buttons:Ext.MessageBox.OK,
        icon:Ext.MessageBox.INFO
   });	
}
</script>
</head>
<body>
<div class="x-panel">
  <div class="x-panel-header">城市级别列表</div>
  <div class="x-toolbar">
    <form action="index.do" method="post">
	  <table width="99%">
	    <tr>
	      <td>
			<span style="color: green; font-weight: bold;">标准名称：</span>&nbsp;
			<s:textfield name="model.name" size="20"/>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<span style="color: green; font-weight: bold;">城市名称：</span>&nbsp;
			<s:textfield name="model.citys" size="20"/>
			<input type="submit" value="查询" class="button">
	      </td>
	      <td align="right">
	        <img src="${ctx}/images/icons/add.gif" />
		  	<a href="${ctx}/base/tripgrade/edit.do">新建</a>
	      </td>
	    </tr>
	  </table>
    </form>
   </div>
   <div class="x-panel-body">
     <div style="margin-left:-3px;" align="center">
     <ec:table items="items" var="item" retrieveRowsCallback="limit" sortRowsCallback="limit"
	   action="index.do" 
	   useAjax="true"
	   doPreload="false"
	   pageSizeList="20,50,100" 
	   editable="false" 
	   sortable="false"
	   rowsDisplayed="20" 
	   generateScript="true" 
	   resizeColWidth="false"
	   classic="false" 
	   width="100%" 
	   height="460px" 
	   minHeight="460"
	   toolbarContent="navigation|pagejump|pagesize|refresh|extend|status">
	   <ec:row>
		<ec:column width="30" property="_o" title="No." value="${GLOBALROWCOUNT}" style="text-align:center" sortable="false"/>
		<ec:column width="150" property="name" title="标准名称" />
		<ec:column width="90" property="subsidy" title="标准" style="text-align:right">
			<font color="green"><b>${item.subsidy}</b></font>
		</ec:column>
		<ec:column width="400" property="citys" title="涉及城市">
		  <div style="height: auto; margin: 2px;">
		    ${item.citys}
		  </div>
		</ec:column>
		<ec:column width="100" property="_0" title="操作" style="text-align:center" sortable="false">
			<a href="edit.do?model.id=${item.id}">编辑</a> |	
			<a href="#" onclick="remove(${item.id})">删除</a>
		</ec:column>
 		
	  </ec:row>
    </ec:table>
    </div>
  </div>
</div>
</body>
</html>